using Net35.Xrm.Sdk.Metadata;
using System;
using System.Runtime.Serialization;
namespace Net35.Xrm.Sdk
{
	[DataContract(Name = "ManagedProperty{0}", Namespace = "http://schemas.microsoft.com/xrm/2011/Contracts"), KnownType(typeof(AttributeRequiredLevel)), KnownType(typeof(BooleanManagedProperty))]
	public abstract class ManagedProperty<T> : IExtensibleDataObject
	{
		private T _value;
		private bool _canBeChanged;
		private string _logicalName;
		private ExtensionDataObject _extensionDataObject;
		[DataMember]
		public T Value
		{
			get
			{
				return this._value;
			}
			set
			{
				this._value = value;
			}
		}
		[DataMember]
		public bool CanBeChanged
		{
			get
			{
				return this._canBeChanged;
			}
			set
			{
				this._canBeChanged = value;
			}
		}
		[DataMember]
		public string ManagedPropertyLogicalName
		{
			get
			{
				return this._logicalName;
			}
			internal set
			{
				this._logicalName = value;
			}
		}
		public ExtensionDataObject ExtensionData
		{
			get
			{
				return this._extensionDataObject;
			}
			set
			{
				this._extensionDataObject = value;
			}
		}
		protected ManagedProperty() : this(null)
		{
		}
		protected ManagedProperty(string managedPropertyLogicalName)
		{
			this._logicalName = managedPropertyLogicalName;
			this._canBeChanged = true;
		}
	}
}
